#include <stdio.h>

int main(void) {
	char b[] = "0123456789ABCDEF";
	int c[64], d, i = 0, base = 16;
	long n;
	scanf("%ld", &n);
	do {
		c[i] = n % base ;
		i++;
		n = n / base;
	} while (n != 0);
	for (--i; i >= 0; --i) {
		d = c[i];
		printf("%c", b[d]);
	}

}